Week 14. Interface and application programming


Scratch

We started by using Scratch for Arduino. S4A is a Scratch modification that allows simple programming some boards of the Arduino open-source hardware platform. It provides new blocks for managing sensors and actuators connected to Arduino. There is also a sensors’ report board similar to the PicoBoard one.

The interface

Steps

we started testing the program by making simple projects such as blinking led using laptop’s keyboard, and using push button. Arduino objects offer blocks for the basic microcontroller functionalities, analog and digital writes and reads Control the Led with Keyboard key (Space )

Controlling LED using drawn button on S4A

open paint Editor and select the shape of the button , draw it

Select the color of the button

Add or Edit the colors you need

Controlling the LED using external push button


Processing

Individual Assignment :

For this week I’m going to use the same sensors I would use in my final project, I would use an LDR sensor to control the motion of the stepper motor, Omar's documentation helped me to use Processing software. The processing code reads the serial value. so I would use it to show the situation of the motor ( ON/OFF)

HTML5 Icon HTML5 Icon HTML5 Icon

I had a problem that takes 2 hours of work, the processing software is responding slowly, so i needed to add a delay for the Arduino code